package com.fzb.forum4j.po;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;

import org.hibernate.annotations.DynamicUpdate;
@Entity
@DynamicUpdate(false)
public class Article extends CommonArea{

	@ManyToOne
	@JoinColumn(name="category")
	private Category category;
	
	@Column(length=200)
	private String digest;

	@OneToMany(mappedBy="area")
	private List<Comment> comments=new ArrayList<Comment>();
	
	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}
	
	public Boolean getDefaultTextArea() {
		return defaultTextArea;
	}

	public void setDefaultTextArea(Boolean defaultTextArea) {
		this.defaultTextArea = defaultTextArea;
	}
	public List<Comment> getComments() {
		return comments;
	}

	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}
	public String getDigest() {
		return digest;
	}

	public void setDigest(String digest) {
		this.digest = digest;
	}
	
	private Boolean defaultTextArea;

}
